<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
        <script src="../js/vue.js"></script>
    </head>
    <body>
        <div id="root">
            <h1>插值语法</h1>
            hello,{{name}},{{addres}}
            <hr />
            <h3>指令语法</h3>
            <a v-bind:href="link.url">{{link.name}}</a>
            <a :href="link.url">{{link.name}}</a>
        </div>

        <script>
            //创建vue实例
            new Vue({
                el: "#root",
                data: {
                    name: "张三",
                    addres:'重庆',
                    link: {
                        name: "百度",
                        url: "https://www.baidu.com",
                    },
                },
            });
        </script>
    </body>
</html>
